# == Schema Information
#
# Table name: sendemails
#
#  id         :integer(4)      not null, primary key
#  email      :string(255)
#  name       :string(255)
#  info       :string(255)
#  status     :integer(4)      default(0)
#  created_at :datetime
#  updated_at :datetime
#

class Sendemail < ActiveRecord::Base
  validates_presence_of :email
  validates_uniqueness_of :email
  validates_format_of :email, :unless => Proc.new{|p|p.email.blank?}, :with => /^([^@\s]+)@((?:[-a-z0-9]+)+\.[a-z]{2,})$/i
end
